//
//  IncomeInfoTableViewCell.m
//  Cat
//
//  Created by lushitong on 2018/12/5.
//  Copyright © 2018年 lushitong. All rights reserved.
//

#import "IncomeInfoTableViewCell.h"

@interface IncomeInfoTableViewCell()

@property (nonatomic, strong) UILabel *leftInfoLabel;
@property (nonatomic, strong) UIImageView *arrowImageView;

@end

@implementation IncomeInfoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {
		self.cellSeparatorStyle = QKUITableViewCellSeparatorStyleSingleLineBottomZero;
		self.selectionStyle = UITableViewCellSelectionStyleNone;
		[self loadSubviews];
	}
	return self;
}

- (void)loadSubviews {
	[self.contentView addSubviews:@[self.leftInfoLabel,self.arrowImageView]];
	
	[self.leftInfoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.left.equalTo(self.contentView.mas_left).offset(kQKFitModuleDecimal(17));
		make.centerY.equalTo(self.contentView.mas_centerY);
	}];
	
	[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.size.equalTo(CGSizeMake(kQKFitModuleDecimal(7), kQKFitModuleDecimal(12)));
		make.right.equalTo(self.contentView.mas_right).offset(-kQKFitModuleDecimal(21));
		make.centerY.equalTo(self.contentView.mas_centerY);
	}];
}


#pragma mark----- lazy init -----

- (UILabel *)leftInfoLabel {
	if (!_leftInfoLabel) {
		_leftInfoLabel = [UILabel labelWithText:@"收益/提现规则" font:[UIFont boldSystemFontOfSize:kQKFitFont(14)] textColor:COLOR_WITH_HEX(0x4A4A4A)];
	}
	return _leftInfoLabel;
}

- (UIImageView *)arrowImageView {
	if (!_arrowImageView) {
		_arrowImageView = [[UIImageView alloc] init];
		_arrowImageView.image = [UIImage imageNamed:@"me_arrow"];
	}
	return _arrowImageView;
}


@end
